<?php

class Vlist extends Zend_Db_Table
{
    protected $_name = 'TYPREF';
    protected $_primary = array('TYPREFDOM','TYPREFNAT');
    
    public function findlist($dom)
    {
    	$select = $this->select();
    	$select->from($this,array('TYPREFNAT','TYPREFLIB'))
    		   ->where('TYPREFDOM = ?',$dom)
    		   ->order('TYPREFLIB');
    	return $this->fetchall($select);
    }
    
    public function getlist($dom){
    	$recset = $this->findlist($dom);
    	$list = array();
    	foreach($recset as $rec) {
    		$list[] = array('key'=>$rec->TYPREFNAT,'value'=>utf8_encode($rec->TYPREFLIB));
    	}
    	return $list;
    }
}

?>
